package com.qijian.maindata.domain.query;


import com.baomidou.mybatisplus.annotation.TableName;
import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import lombok.ToString;

import java.util.Set;


/**
 * 提醒-前道工单未完成对象 查询条件类
 *
 * @author qijian
 * @date 2024-12-11
 */

@Data
@ToString
@TableName("rm_unfinished_previous_process")
public class RmUnfinishedPreviousProcessQuery {

    @WhereType(filed = "id")
    private Long id;
    @WhereType(filed = "id", type = WhereTypeEnum.IN)
    private Set<Long> ids;
    @WhereType(filed = "factory_name", type = WhereTypeEnum.LIKE)
    private String factoryName;
    @WhereType(filed = "item_name", type = WhereTypeEnum.LIKE)
    private String itemName;
    @WhereType(filed = "project_id")
    private Long projectId;
    @WhereType(filed = "project_machine_no", type = WhereTypeEnum.LIKE)
    private String projectMachineNo;
    @WhereType(filed = "item_id")
    private Long itemId;
    @WhereType(filed = "drawing_no", type = WhereTypeEnum.LIKE)
    private String drawingNo;
    @WhereType(filed = "part_no", type = WhereTypeEnum.LIKE)
    private String partNo;
    @WhereType(filed = "user_id")
    private Long userId;
    @WhereType(filed = "nick_name", type = WhereTypeEnum.LIKE)
    private String nickName;
    @WhereType(filed = "max_sort")
    private Long maxSort;
    @WhereType(filed = "finished_process", type = WhereTypeEnum.LIKE)
    private String finishedProcess;
    @WhereType(filed = "line_id")
    private Long lineId;
    @WhereType(filed = "unfinished_process", type = WhereTypeEnum.LIKE)
    private String unfinishedProcess;
    @WhereType(filed = "work_code", type = WhereTypeEnum.LIKE)
    private String workCode;
    @WhereType(filed = "project_manager_id")
    private Long projectManagerId;
    @WhereType(filed = "project_manager_name", type = WhereTypeEnum.LIKE)
    private String projectManagerName;
    @WhereType(filed = "work_id")
    private Long workId;


    @WhereType(fields = {"factory_name", "rm_unfinished_previous_process.item_name", "project_machine_no", "drawing_no", "part_no", "rm_unfinished_previous_process.nick_name",
            "finished_process", "unfinished_process", "project_manager_name", "rm_unfinished_previous_process.work_code"}, type = WhereTypeEnum.LIKE)
    private String condition;


    @WhereType(func = "(user_id ={1} OR project_manager_id = {1} OR factory_user_id = {1}  )")
    private Long filterUserId;

    @WhereType(ignore = true)
    private String dataScope;

    @WhereType(filed = "collect_date", type = WhereTypeEnum.LIKE)
    private String collectDate;

}
